# Contributor: Renoir Boulanger <hello@renoirboulanger.com>
# Maintainer: Andy Postnikov <apostnikov@gmail.com>
pkgname=php82-pecl-yaml
_extname=yaml
pkgver=2.2.2
pkgrel=0
pkgdesc="YAML syntax bindings for PHP 8.1 - PECL"
url="https://pecl.php.net/package/yaml"
arch="all"
license="MIT"
depends="php82-common"
makedepends="php82-dev yaml-dev"
source="php-pecl-$_extname-$pkgver.tgz::https://pecl.php.net/get/$_extname-$pkgver.tgz
	fix-test.patch
	"
builddir="$srcdir/$_extname-$pkgver"

build() {
	phpize82
	./configure --prefix=/usr --with-php-config=php-config82
	make
}

check() {
	make NO_INTERACTION=1 REPORT_EXIT_STATUS=1 test TESTS=--show-diff
}

package() {
	make INSTALL_ROOT="$pkgdir" install
	local _confdir="$pkgdir"/etc/php82/conf.d
	install -d $_confdir
	echo "extension=$_extname" > $_confdir/70_$_extname.ini
}

sha512sums="
4c1d3012623154b8d74908fb319a637d7bff178d02d0732d1a3d19d24df2c612d62948eb7dcd9ead9fd31f2da7af0cec54657b8cce128968a04079dd0002117d  php-pecl-yaml-2.2.2.tgz
1d73382ef77168d868e50446d90fed03cc72b1964ba4e69d9f157ef0274551260d8befa2cb5f1819d81f7fb34d433f8fb97c1fde612994a6ed9d456496ce6378  fix-test.patch
"
